package com.qf.weapon;

public class LongSword extends Weapon {

    @Override
    public int caculateDamage(HeroPlus heroPlus) {
        return (int) (heroPlus.getPower() * 1.5 + this.getAtk());
    }

    /**
     * 打印武器信息
     */
    public void printInfo() {
        System.out.print("名字:" + getName());
        System.out.print(" 类型:" + getType());
        System.out.println(" 攻击力:" + getAtk());
    }

    public LongSword() {
        //
//        this.setType(0);
//        this.setAtk(20);
        this("长剑", 0, 20);
    }

    public LongSword(String name, int type, int atk) {
        super(name, type, atk);
    }
}
